/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-04-27
 * Time: 17:08
 */
public class Test {
    public static void main(String[] args) {
        Computer computer = new Computer();
        computer.powerOn();

        //使用鼠标
        computer.useDevice(new Mouse());

        //使用键盘
        computer.useDevice(new KeyBoard());

        computer.powerOff();
    }
}
